Page({
  data: {
    HouseDetail: {},
  },
  onLoad({ id }) {
    // console.log(id)
    this.getHouseDetail(id)
  },
  // 获取房屋详情消息
  async getHouseDetail(id) {
    const { data, code } = await wx.http.get('/room/' + id)
    if (code !== 10000) return wx.utils.toast('参数错误')
    this.setData({
      HouseDetail: data,
    })
  },
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.data.HouseDetail.id,
    })
  },
})
